﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Xml;

namespace GoShopping.Web.UserControls
{
    public partial class MainPrdtShow : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                XmlDocument xd = new XmlDocument();
                xd.Load(Server.MapPath("~/Config/PrdtConfig.xml"));
                XmlNode xnl = xd.SelectSingleNode("//Index/MainPrdt/pic");
                Image1.ImageUrl = "~" + xnl.Attributes["src"].Value.Remove(0,1);
                redirectA.HRef = "~/CommonProducts.aspx?prdtId=" + xnl.Attributes["Id"].Value;
            }
        }
    }
}